package com.cqc.datedemo1;

import java.util.Date;

public class datedemo {
	
	public static void main(String[] args) {
		
		Date date = new Date();
		System.out.println(date);
		System.out.println(date.toString());
		System.out.println("-------------------");
		
		long currentTime = System.currentTimeMillis();
		System.out.println("currentTime="+currentTime);
		
		Date date2 = new Date(1476198132783L);
		System.out.println("date2="+date2);
		
		Date date3 = new Date();
		date3.setTime(1476198132783L);
		System.out.println("date3="+date3);
		
		Date date4 = new Date(currentTime);
		long time4 = date4.getTime();
		System.out.println("date4time="+date4.getTime());
	}
}
